fixing reloading /caching / unlocking /locking of tables