fix cut off border in diagram