fix to previous issues (untested)

xcoh main loop can be improved (refer to changes in subxcoh main loop)