Fix matrix rotation for brushes