Fixed a couple problems

SQL script and table details