Fixed some bugs with cell editing