added lock for heroku support