Fix rebasing and test