Add new exceptions, fixed some problems