Fixed some planned downtimes queries