Fixed an occasional empty path crash