fix print message for while