Fix path rendering

Images to reproduce the problem: [img1](https://drive.google.com/file/d/0Bw7fhZZkMvXpd3AxY0F6UHB0WW8/view?usp=sharing) [img2](https://drive.google.com/file/d/0Bw7fhZZkMvXpWHlZbnhJdDFKMzg/view?usp=sharing)