Fix small bug in finalize script