Fixed invalid ReleaseAssert, minor code improvement with TaskDispatcher