fixed a bug in vsprintf