Remove unnecessary when() call