fixed bug from rails 3.2.13