fix tasks bugs