bugfixes for tickets 583, 611, 632