Fixes an incompatibility with the last rails version