fix deserialization for Rails 4.2