fixed database path
total_count field added