GUI-1309

applied fix from elsewhere to this code