background switch and minor fixes