Fixes from when I rebased back onto master