Fixes to stuff that was broken