Changes to make it work with nginx