print and some minor fixes