fixed signed vs unsigned warning