cast enum to avoid warnings on 10.9