Updated ad loading code