Fixing bug in autoloader