workaround for double free corruption