Fixing sql alec