errors state now applied and unapplied correctly