Fixed a couple bugs
Merge branch 'master' of github.com:SqlOptimizer/SqlOptimizer