fixed issues with execute sql