some fixes for Devise in production