pretty-print
fixed bug with refreshing levels