getStateName now correctly returns const char *