Patch for #47

Patch for #47