Fixed bug: target cell remains invalid after giving it a valid value