path: fix invalid access