remove broken error handling code