Fixed more bugs related to paths