bug fixes for accrual based accounting