Fix bug in pretty printing. Support mocked modules.