Follow up fix to #5643

Looks like a else clause is missing from previous fix of #5643