fix get entity bug