improve 404 condition