Fix various issues following recent merges