Fixed incorrect error indicator being set.