Oops, max tile wasn't right
tile values must be converted to ints first