fix signed/unsigned warnings