fixed sprintf in output