Fixing bug in getting request's data