Reordered functions in nginx, fixed potential if syntax error in nginx init