small changes to fix printing issue