fixed entities not saved