Fixed assert bug in mapcacheViewer, and added+1 to z coordinate in the tiles function to try to get a similar output to the regular map when prevewing