Fix termination of all sessions in gateone

Fixes #499