fixes for rails-4