fixing 2 bugs in S
Merge branch 'master' of https://github.com/diplay/Project