fixing snprintf bug, fucking strlen()