fix incorrect empty cell handling