Fixing tiles template definition. Closes #686

Closes #686