patch for ticket #570