bugfix for rails 3.0 and ruby 1.9.3