amf decoding fixes