Fix bugs from the merge.