fix model detection