fix type error on macos 10.9