Some fixes

I should probably write more explicit commit messages if anyone
actually uses this I'd be happy to update documentation