fix db restore script