fixed some boundaries at matrix examples