fix sprintf usage