add synchronize block for path drawing