fix type error on OS X