Reducing the losses of optical metamterials