Collapsed unnecessary when clause