Fix hooks, add call to isOnline in API