fix after main run loop