fixed infinite loop
Merge branch 'master' of https://github.com/Esysteme/synapse