handle the background overflow problem