Fix some things that broke due to refactoring