fix coverity's issues