Work around for rails issue #4652