Avoid registering observers more than once to fix possible crash