fixed entity issues