Fix NPE that seems to only happen on RAM chips.