In your script you're setting the CHILD flag. This lets the view inherit the parameters from the preceding stage, so your bg setting has no effect. Only the NOSKY flag did work because flags are not inherited.