fix in while printing