fixed issue with null tasks