fixed warnings popped up in windows; some of them were risky (e.g. not all paths returned a result)