OSX related patches added