Updating function to return properly size when value < 1024