Fixed pull request bugs.