fixed autoloader to only register and use one loader function