fixes #248

Replaces variable in if statement so that both are of type int