fix some minnor bugs