Fixes #116 better per @xuwei-k's comment