PowerMock and fixes