Fix bugs introduced in merge.