Bug fix for rounding issue found by jratajski