Fix for infinate loop if not setup correctly
Changes to run on Linux