Fixed Unit testing issues