Cast to integer to make if statement useful