Fixing minor SQL bug.