Merge pull request #6 from unikent/master

SQL
Fix some issues
Fixes
Fix sql
Merge pull request #7 from unikent/STABLE

Stable