support for printing and other fixes