fixed bugs for version 1.0