Just a little patch to add compatibility with rails 4