some minor changes and bug fixes
Merge branch 'kevin'