Fixed while and do_while. But I still need to figure out why it does not work when I don't free the cells...