Fix error handling in 'zero' function.