My condition to show table doesn't work