mistakenly called back on error - fixes issue #5