fix and update code to latest go-flags