meshTables: bugfix and cleanup