Fixed incorrect error message breaking tests