fix signed/unsigned comparison
don't inline code in debug build