Fixed bug in tile variable declaration