handle bad rows properly