fixed a test for function redefinition
added end character to error messages