fixed the integer comparison