Fixed another 'bool' bug.
Fixed crash when 'keyval_name' returns nil.