registration, some fixes