~ fixed a bug that occured on deleting an entity