bugfix in Mac OSX