fix for my simple registry function