fix printf bug in common.cpp