fixed issues on ubuntu; made to work on successive runs if already installed