why is the script exiting early? Is this an issue with heroku?