Fixed template bug, closing #64