Fix path compare bug