Fixed bug in reply parsing procedure