server: fix infinite loop on server spawn