Fix exception while returning an error
Use random package id (fixes issue #1)