rails3 fixes