fix restrictions for maximum value