remove unnecessary when.

if this 'when' exists, condition is always false.