try to hack to work with rails 4