ai.GetTaskID returning nil

It's been a problem for quite a while that ai.GetTaskID's been return nil which causes scheduling functions to fail. I'm not sure who originally created the file, but it's commonly used to manually override the function. A more permanent fix would be nice though.