Fixed NullpointerException