fixed some exceptions.