fix handling of missing column better