Fix table referencing