Bug fixes for Groebner basis printing