Merged a change from a pull request, added a break

Merged from https://github.com/greato/ProjectTox-Core