Entity resource fix (DI)