a few minor bug fixed