fix buffer size for registry values, thanks felix