fixed NullPointerException