Fixes for when this is loaded as a package