fixed handling of zeros