fixed potential crash