fixed template issue when inserting new tiles