minor fix (cast to int in if statement)