notFound instead of badRequest, fixing types