Fixed bugs on OS X 10.9 (ruby 2.0)