minor update, fix bugs