fixes issue

Thanks to @wedgybo for this.