Corrected some merging issues

fixes #310