fix for heroku redirect loop issue