Fixed wrong initialization of scoping