fixed sprintf usage