updated for release
reapplied change from jpff to make division by zero a warning