fixed "CGContextSaveGState: invalid context 0x0...."