Fixed table bug and added references update