Fix bug in value assignments