Handle exception better.