popInputPath() removes a path from the end. Was from the beginning!!!