Fixing simulation and cleaning datatable