fix a compiler error (under xcode) and a compiler warning