Fix bug with global terminal