fixes for ticket #29