fix a bug and minor update