casting
fix illegal origins error
fix for heroku
fix for heroku
fix for heroku