Tests and fix for Issue #61