Minor bug fixes
Merge branch 'schoolgate-master' of github.com:schoolgate/schoolgate into schoolgate-master