remove bugs resulted by merge upstream/master