fix some ill bugs