fixed imageCandidates length check