Fixing various bugs that weren't on the issues list.