More bug fixes for autoloading