Issue #29: Fixed premature return