close task and solved some bugs