fixing up foreground/background stuff