Fix memory block layout