fix rails 4 deprecation warnings genrated in mds