Updated to work with nginx