Fix worse errors after refactor