Fix some extension bugs