fix main and stop