Fix bug of registry