Some fixes to classloaders