Fixed diagnostic queries