Fix closepath behavior.