remove hanging versions on newline