fixed bugs with tid and sql query for shutdown VMs
removed tie pm