Number of elements bug fixed