#472 Refactored to guard clauses