Added detach(entity);