Table rates not correct if product price changes via custom option
I have a problem with table rates.
I've set-up different shipping costs - price vs. destination and most of them are the following:
0 - 40eur -> 5.95 eur shipping rate
40+ eur -> free shipping (so 0 eur)
Everything is working fine, exept when the customer chooses the product size, and the price goes up with 5eur, from 39.95 -> 44.95eur.
Now, what's strange here is if the customer chooses other custom option, let's say +10eur, that's let's say from 39.95 -> 49.95eur, then it works fine, it shows free shipping, so basically it's not working only for the smaller price increment of 5eur.