Fixed bug in integer validation