fixed 'unregisterAll' method