Changed the mock to be compatible with old versions