fixed getcwd() return value