fix an NullPointerException