Changes in both
Merge sharelatex-2014-10-03-1308 into master