<code>$extension</code> is not initialised