Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/42157 Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/41989