Fixed deploy script to handle staging env