Fixed validation of integers.