Improved tile border handling