fix bug when running on different dir