Fix issue in nginx config
Fix error in email exception handling