Optimizations for windows/osx