Fixing scope implementation