Fix ext detection