Fixed a bug with invalid size generation.