fix notices (error cases)