Fixed issue with tasks not completing