fixing for osx mavericks
Merge branch 'master' into mavericks-fix