handle more error cases