Fixed non-string registry value casting exception.