Fixed cpu issues on osx