Fix for #114

@settinghead please review