fixxed a null pointer