Fixed incorrect error messages