fixed potential null pointer