Some fix and debug