Fixed error injection bug