Fixed bug for OS X