fixing getval() was broken if you used something like 'key.key'