Linux fixups
Fix an infinite loop bug

I'm still not sure why that line works