revert the lstat part