Dumb fix to not take 100% cpu when backgrounded.