Added some changes from master branch.