fix variables clean after set_offline function