some fixes for registration process