Corrected some errors in merge