Fixed bug with injection the registry