fix for rails3