fixing activate race condition