spec: add a check for the size