Fixed problem in the repair script for v6.x