fix some bugs i just introduced with that cleanup