fixed potential problems.