Fixed bug with template and placement