Some fix and improvement