fixed OSX compile error