Fixed bug when the input field was a decimal number