Fixed namespace errors during php template creation