Fixed a bug in values object generation