fix broken dataset dropdown in the automatic extraction sidebar and improve user script handling