config dynamically for server and local, grid fix