Fix error with registartion