workaround for weird stack corruption