bugfix issue #113: callback called multiple times with error