fix(register.go) add lock protection when accessing shared map