Implemented temporary guard to prevent race conditions with AI (this won't be necessary soon).