In cases where the residence permit of the family members issued by the first Member State expires during the procedure or no longer entitles the holder to reside legally on the territory of the second Member State , Member States shall allow the person to stay in their territory , if necessary by issuing national temporary residence permits , or equivalent authorisations , allowing the applicant to continue to stay legally on their territory with the EU Blue Card holder until a decision on the application has been taken by the competent authorities of the second Member State .