bugfix for Rails3.0