Fixed the merge vertex test.
Fixed bugs related to fixing it.