Fixes to autoloader