Added extension substituting.