Fixing issue #185. NPE when completing a null task.