Fixed code typos that prevent compiling on OS X