fixing entity problem