Fixed two NPEs.