refator task module and fix task problem bug