Update bug fix for #191

This fixes ticket #191.