modify a few bugs