Remove redundnat code in error message