added fix for tileToMap