Scope fix and tables changes