Fixed runtime error on context 2d