Fix task access bugs.