added more tolerance to exceptions