Fix receiveMessage to match spec (1 by default, at most 10 if requested).