little change: refine logic
fix compilation error using GCC