Patch for issues #30