patch for issue #9