Only try to hook once on the API events

Hook only on startup at the API events.