Update background and foreground