FIxing issue #34 and some others noticed while doing so