Autoload bugfixes, introduced global variables