Windows/OSX fixes