Fixed diagnostic checks