Fixed some exceptions