Fix NSImageRepresentation bug