bug fix and shell function for editTile