Enhance and fix bug.