fixing type bug in var decs