fixed Cmp value must be double; fixed error localtion