fixed conversion bug that was causing negative numbers to be returned.