Updated registration logic