fixed bug with editing background/foreground