fixes for some nginx issues