fixed bufsize for sprintf