added check for background images