fix TODO: complain if name is too large