Fix bug in ValueError catch: need to return