Made a bit more robust for definition failures