Issue 641

Fixes bug #641