fixes a bug in noclasspath mode (NPE in csome special cases)