fixed signed-unsigned bug