Fix a NullPointerException