fixes odd rails/devise behaviour