fix check if table already exists