Misc changes + fix critical bug from accidental commit