ref #81 fixed int/unsigned int mismatch