fixes for ticket #32