fix bugs in editTable