Correct SPTW tile writing functions.