fixed some errors from merge