fixes multiple tables issue