Allan McGregor has expressed his gratitude towards Walter Smith for letting him continue his Rangers career following the 'Boozegate' affair.
McGregor's long-term future with the SPL champions was finalised on Monday after he put pen-to-paper on a lucrative six-year deal.
However, things could have been different had former boss Smith not had words with the Scotland international in the wake of his behaviour with team-mate Barry Ferguson while on international duty.
The keeper was caught making V-signs on camera alongside Ferguson and the pair were also accused of all-night drinking at a hotel while on duty with Scotland in 2009.
Midfielder Ferguson departed for Birmingham, although McGregor was given a second chance by Smith, something he has thanked the club legend for.
"I was glad to get back in the team at the start of the following season and I was obviously grateful to Walter for that," said McGregor.
"But those first few weeks after what happened were difficult. As soon as I came back to training I got my head down and worked away.
"Whatever's happened I've always been focused at training and playing."
He added in the Scottish Sun: "It was a big change from when he pulled me in immediately after the Scotland game - when I saw a scary side to him.
"Obviously you listen to him. He has been there, done it and worn the T-shirt when it comes to management. I respected him and what he said and took it on board."