Fix error with registration