fixed merge and debug condition