Bugfix, lgth and setProgress functions