Bug fix and add in function to set and get merges.