fix nullpointer in taskimpl