Fix stuff to make perl bindings happy