Fix temp table creation