Fix rails-related bug (returning SafeBuffer on to_s)