envelope optional callback fix