Bug fix: last change broke error handling.