minor fix, moved createWidget variables into showWidget