Fixed bug mentioned in Issue #357