Fix problem with number of elements cookies initialization