Fixed further NullPointerExceptions in Core.java

More indexes going out of bounds.