fixed the issue that on heroku doesn't work