Unable to do boolean test on int