SQL for spell fix, and some more fixes