Fix problems from rebase on master