Fixed bug with number of elements in the contributions array