fix draw to not use global ctx