Put in check for nginx version, fixed variable errors