fix several issues on nginx install