candidates generation bug fixed