fix some lib problems