more robust column checking