Fix for #213.  Thanks to rh0dium