Welcome aboard
First off the 10W40 should be a Semi-synthetic oil, which the 20W50 oil probably isn't. If it was me I'd change it back to the correct oil, even if the 20W50 oil turns out to be semi-synth. Then take it from there if the bike is still smoking,
Chris.