Fix bug in releasing old path