fix map NullPointerException bug