Fix null pointer exception!