fix signed/unsigned type bug in wlib