Adding bug fix for waiting for background image load