Fixed bug where maxlength attribute would stay if decimal point was deleted