fixed incorrect update to Q values when merging vertices