Fixes CGContext Errors on Simulator

When testing this on the iOS 6.1 simulator, I encountered CGContext errors and this fork fixed it. More info here: http://stackoverflow.com/questions/17985167/cgcontext-errors-only-in-simulator/17985431?noredirect=1#comment26295758_17985431