diff --git a/src/scheme/debug.rs b/src/scheme/debug.rs
index fc3c983b5d2e26062f901377ae9e69dfb4da270f..fa559f37dd057ccc6aa834ce056161abff7b0107 100644
--- a/src/scheme/debug.rs
+++ b/src/scheme/debug.rs
@@ -126,7 +126,7 @@ impl Scheme for DebugScheme {
             *handles.get(&id).ok_or(Error::new(EBADF))?
         };
 
-        Ok(0)
+        Ok(id)
     }
 
     fn fpath(&self, id: usize, buf: &mut [u8]) -> Result<usize> {