Fixed some exceptions.