Made 2D unfolding code compilable