Fixing background switching at terminal (issue #7)