some fixes for nginx-passenger script (not yet fully working)