fix for basesql