fix value error smaller or equal