nullNaN / OGLight

I am experiencing a problem with the randomized target expedition system.
I have a planet which is close to 499. My random system count is high enough so that the random system can be higher than 499. In this case I have to change coors manually because I canĀ“t hit send.
The results should be limited to 499 or in a donut universe if its higher than 499 simply deduct 499 so the expedition will go to system number 2 for example.

My system is 497
Random system is set to 7

I know I can easily fix the problem by reducing the random number but I think it should still be solved.