Fixed possible bug caused by not clearing task cache when saving.