fixed some exception error issues