fix index problem on tables from gui

Signed-off-by: aurel <aurel.savoiu@cti.pub.ro>