Adjusted for OS X