Small type spec improvement in elected callback

Please refer to commit message.