bug fixes for accounting