Bug fix to #3