modified check for bogus canonical string