fix some assert bugs