Fixed a bug where wrong item was being removed from array during postresponse