bug 1065: fixed sprintf