Bug fix on api elections search