fix doctrine proxy issues with traits