Fixed weird scoping issue