fix erroneous math in tile location calculations