Fixes issue with nginx 500 responses