fixed bugs in pull request