Register finished but exception is thrawing