Merge upstream branch and fix private methods to be protected