fix a local unreferenced error and an import error on startup
fixed presets