Fixed bug in registering immediately after unregister and subscribe/unsubscribe