fix: bugs introducted by refactor
merge