Fix creating elections and syncing to the frontend