Fix after rebase
Fix bugs raised after rebase