fixed bug with path drawing