fix upgrade* and build commands