Fixes from refactor