Fix portability issues with the staging step.