fix associations between appointment and window