fixes #1809 - fixed return of pwd