Fix some stuff from recent pull requests