fix to sprintf error