fix detect call