Fixing db execution issues