Added exception check.