fixing fetch all bug