fixing unit tests and multicounting bug