Scoping Issue Fixed