Minor refine of common.c