fixed problems caused by rails-api