Replace get with get_or_404 for missing records