improved go command handling