Some small fixes for perl-gluing code