Fixed error which occured when working with paths.