fixed NullpointerException