Fix error when first enabling extension