added debugging on autoregister