bugfix for CPU 100% usage for linux/macosx