Small fixes to bugs that somehow slipped through