Fix bug in hasTableDetails if checks and refactors status