Bug fix for nginx script