fix issues with uav script and end conditions