Added OSX compatibility