Improve the find empty cell method