Some minor improvements

I added them while using it for my use case to work better with this very helpful lib.