model detection fixed