Fix background darkening code