Patch from Guillaume Cottenceau to add some missing functions