fixed reason for NullPointerException