improved handling for empty columns