Fixing misc problems from refactor