Fixed up() function to not break path variable