Correction for two successive stop calls, fixes #226