Fixed bug on length of the object