Fix some queries; add an index on builder name