Fixed bug with create template