Factored out table finding and fixed for atomise set to true