fixed problem with entities