Fixed wrong variable type for sprintf.