delete main in error