fix bugs in master branch