Made some changes to split paths correctly.