various fixes after refactor