Added fix proposed by github user firemyst13 on issue 27