fix exception types in some specs