fixes some compatibility issues with rails 4.1 before filters