This seems to fix bug #1.