Fixed a bug while incrementing number of elements.