Fixed some weird CGContext error on OS X