fixed bug in values code