OSX: fixed crash