Fixed some mocking issues and an exception change