fixed pretty printing and import/export bugs