ByteArray.cs with AMF parsing updated to be set to the right position