Fix bug algo if the background is tested