fix some runtime bug