fixed some exceptions