fixed database escape bug