fixed bug with using wrong global border when restarting the game