fix bugs of multiple use