If you really want to protect yourself, you need to hire an attorney.
Your tenants had an agreement and it does need to be honored. You can be nice and tell them that they will have to continue to pay rent until they find a suitable tenant to take over their lease, or you can be not as nice and sue them for breach of contract and the remainder of the lease fees.
Either way, you want an attorney to help you cover your butt.

