Fixed bad bug in table access