Fix warnings
Fix error when using new registry