fixed some restarting and printing issues