registry key bug fix