fixed registration and other stuff