patch for ticket #137