Fix capacity checks