Bug fix for setBackgroundImage function.