Legislature passes bill to protect witnesses in family violence