Fix extension check.