prettify canoncial basis implementation (bug workaround 9397)