Some of the db/table calls were reversed.