Fix browser function for Windows and OSX