fix php error from template