fixed some incorrect behaviors when doing more than one task