fixing signed/unsigned warnings