Mac fix for drawLayers