Fix #1: update offset and active when cap >> size.