fix some problems