Fixed a problem that caused decode_keys to error on 2.x