Updated exception handing