EndMode almost works.