fixing registration stuff