Corrected miss allocate for variables