fixup some bug / change debug