Fixed stack corruption