Fix #678 candidates_len problem