prevent loop in exception handling