fixes for rails3 oops