Preventing GM window to be closed for some commands, useful for testing.