diff --git a/src/main.rs b/src/main.rs
index 67fd0ab..4afde7e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -85,7 +85,7 @@ fn show_post(title: String) -> Template {
     let mut context = get_context();
 
     let title_splited: Vec<&str> = title.split('-').collect();
-    let id = title_splited.last().unwrap().parse().unwrap();
+    let id = title_splited.last().unwrap().parse().unwrap_or_else(|_| -1);
 
     match get_post(id) {
         Ok(mut post) => {