fixed potential bug.