fix bug of 'fail to get entity'