Fixes an issue where the mock object wouldn't have the same structure.