Correctly release background buffer