fix incorrect encoding in packed fields encoder
fix rspec deprecation warnings