more fixes for refactor