Fixed mising references to tables