various bug fixes
Merge branch 'master' of https://github.com/buaayz/SAD