Fixed Legion exit to listen for signals. v0.5.1