sprintf was missing the correct number of variables