fixes for ticket #37