was returning when should have been continueing in appendTemplate()