Added 404 handling to get/edit actions