Fix a couple more NullPointerException occurrences