fix detect limit from databse