Fix autoloading code