try to make rails 4 compatible