fixes to bug with repeat errors, set off for testing