some fixes after rebase