Fixed a few SQL errors