Fix Entity Manager