fixed bugs.