fixed the editCandidate to update the status