fixing crash with near corner tiles / mode5