Change structure to prevent malloc error