fix detect