Added error processing back